{"componentChunkName":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js","path":"/code-style/ExchangeCommitFacet-ECF","result":{"data":{"mdx":{"id":"4200c8aa-4a22-528d-9af3-378e06c5c833","excerpt":"ECF-01C: Redundant Conditional Validation Type Severity Location Gas Optimization ExchangeCommitFacet.sol:L374 Description: The referenced conditional will…","fields":{"slug":"/code-style/ExchangeCommitFacet-ECF/"},"frontmatter":{"title":"ExchangeCommitFacet Code Style Findings","description":"Contains all the findings that relate to code style on the contract codebase","image":null,"disableTableOfContents":null},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"ExchangeCommitFacet Code Style Findings\",\n  \"description\": \"Contains all the findings that relate to code style on the contract codebase\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", {\n    \"id\": \"span-idecf-01cecf-01c-redundant-conditional-validationspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idecf-01cecf-01c-redundant-conditional-validationspan\",\n    \"aria-label\": \"span idecf 01cecf 01c redundant conditional validationspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ECF-01C\"\n  }, \"ECF-01C: Redundant Conditional Validation\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.5.0-68d13ccd7155940015e05fd3/appendix/finding-types#gas-optimization\"\n  }, \"Gas Optimization\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/facets/ExchangeCommitFacet.sol#L374\"\n  }, \"ExchangeCommitFacet.sol:L374\"))))), mdx(\"h3\", {\n    \"id\": \"description\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description\",\n    \"aria-label\": \"description permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The referenced conditional will redundantly evaluate whether the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"OfferCreator\"), \" enum of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Offer\"), \" structure is a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Buyer\"), \" even though the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"enum\"), \" supports two states and one of the two has already been excluded.\"), mdx(\"h3\", {\n    \"id\": \"example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example\",\n    \"aria-label\": \"example permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/facets/ExchangeCommitFacet.sol highlight={1,7} lineNumbers=true lineOffset=367\",\n    \"title\": \"contracts/protocol/facets/ExchangeCommitFacet.sol\",\n    \"highlight\": \"{1,7}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"367\"\n  }, \"if (_fullOffer.offer.creator == OfferCreator.Seller) {\\n    // Validate caller is seller assistant\\n    (, uint256 sellerId) = getSellerIdByAssistant(_offerCreator);\\n    if (sellerId != _fullOffer.offer.sellerId) {\\n        revert NotAssistant();\\n    }\\n} else if (_fullOffer.offer.creator == OfferCreator.Buyer) {\\n    uint256 buyerId = getValidBuyer(payable(_offerCreator));\\n    if (buyerId != _fullOffer.offer.buyerId) {\\n        revert NotBuyerWallet();\\n    }\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation\",\n    \"aria-label\": \"recommendation permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise the referenced conditional to be set to an \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"else\"), \" clause, optimizing its gas cost.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119\",\n    \"aria-label\": \"alleviation efd5d1a8f23c3bca7c25273ea4c912a367250119 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):\"), mdx(\"p\", null, \"The Boson Protocol team evaluated this exhibit and opted to retain the code as is as they consider it to be more legible and future-proof.\"), mdx(\"h2\", {\n    \"id\": \"span-idecf-02cecf-02c-redundant-validation-of-seller-parametersspan\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#span-idecf-02cecf-02c-redundant-validation-of-seller-parametersspan\",\n    \"aria-label\": \"span idecf 02cecf 02c redundant validation of seller parametersspan permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), mdx(\"span\", {\n    id: \"ECF-02C\"\n  }, \"ECF-02C: Redundant Validation of Seller Parameters\")), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Severity\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Location\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"/reports/boson-protocol-version-2.5.0-68d13ccd7155940015e05fd3/appendix/finding-types#gas-optimization\"\n  }, \"Gas Optimization\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"img\", {\n    parentName: \"td\",\n    \"className\": \"o-severity o-informational\",\n    \"src\": \"https://omniscia.io/report-assets/informational.png\"\n  })), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    parentName: \"td\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/facets/ExchangeCommitFacet.sol#L260-L266\"\n  }, \"ExchangeCommitFacet.sol:L260-L266\"))))), mdx(\"h3\", {\n    \"id\": \"description-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#description-1\",\n    \"aria-label\": \"description 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Description:\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/bosonprotocol/boson-protocol-contracts/blob/6a14c31bead936ed03b2d51ab82010ecd1047f40/contracts/protocol/facets/ExchangeCommitFacet.sol#L252-L336\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"a\"\n  }, \"ExchangeCommitFacet::createOfferAndCommit\")), \" function will validate the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"BosonTypes.SellerOfferParams\"), \" if the offer creator is the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Seller\"), \" to ensure they remain unspecified, however, they will not be utilized in such a case.\"), mdx(\"h3\", {\n    \"id\": \"example-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#example-1\",\n    \"aria-label\": \"example 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Example:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-sol\",\n    \"metastring\": \"title=contracts/protocol/facets/ExchangeCommitFacet.sol highlight={2,65,71} lineNumbers=true lineOffset=259\",\n    \"title\": \"contracts/protocol/facets/ExchangeCommitFacet.sol\",\n    \"highlight\": \"{2,65,71}\",\n    \"lineNumbers\": \"true\",\n    \"lineOffset\": \"259\"\n  }, \"if (\\n    _fullOffer.offer.creator == BosonTypes.OfferCreator.Seller &&\\n    (_sellerParams.collectionIndex != 0 ||\\n        _sellerParams.royaltyInfo.recipients.length != 0 ||\\n        _sellerParams.royaltyInfo.bps.length != 0 ||\\n        _sellerParams.mutualizerAddress != address(0))\\n) revert SellerParametersNotAllowed();\\n\\n// verify signature and potential cancellation\\n(bytes32 offerHash, uint256 offerId) = verifyOffer(_fullOffer, _offerCreator, _signature);\\n\\n// create an offer\\nif (offerId == 0) {\\n    offerId = createOfferInternal(\\n        _fullOffer.offer,\\n        _fullOffer.offerDates,\\n        _fullOffer.offerDurations,\\n        _fullOffer.drParameters,\\n        _fullOffer.agentId,\\n        _fullOffer.feeLimit,\\n        false\\n    );\\n    protocolLookups().offerIdByHash[offerHash] = offerId;\\n\\n    if (_fullOffer.condition.method != BosonTypes.EvaluationMethod.None) {\\n        // Construct new group\\n        // - group id is 0, and it is ignored\\n        Group memory group;\\n        group.sellerId = _fullOffer.offer.sellerId;\\n        group.offerIds = new uint256[](1);\\n        group.offerIds[0] = offerId;\\n\\n        // Create group and update structs values to represent true state\\n        createGroupInternal(group, _fullOffer.condition, false);\\n    }\\n}\\n\\n// Deposit other committer's funds if needed\\nif (!_fullOffer.useDepositedFunds) {\\n    uint256 offerCreatorId;\\n    uint256 offerCreatorAmount;\\n    if (_fullOffer.offer.creator == BosonTypes.OfferCreator.Buyer) {\\n        // Buyer-created offer: committer is the seller\\n        offerCreatorId = _fullOffer.offer.buyerId;\\n        offerCreatorAmount = _fullOffer.offer.price;\\n    } else {\\n        // Seller-created offer: committer is the buyer\\n        offerCreatorId = _fullOffer.offer.sellerId;\\n        offerCreatorAmount = _fullOffer.offer.sellerDeposit;\\n    }\\n\\n    if (offerCreatorAmount > 0) {\\n        transferFundsIn(_fullOffer.offer.exchangeToken, _offerCreator, offerCreatorAmount);\\n        increaseAvailableFunds(offerCreatorId, _fullOffer.offer.exchangeToken, offerCreatorAmount);\\n        emit IBosonFundsEvents.FundsDeposited(\\n            offerCreatorId,\\n            _offerCreator,\\n            _fullOffer.offer.exchangeToken,\\n            offerCreatorAmount\\n        );\\n    }\\n}\\n\\nif (_fullOffer.condition.method != BosonTypes.EvaluationMethod.None) {\\n    if (_fullOffer.offer.creator == BosonTypes.OfferCreator.Buyer) {\\n        addSellerParametersToBuyerOffer(_committer, offerId, _sellerParams);\\n    }\\n\\n    commitToConditionalOffer(_committer, offerId, _conditionalTokenId);\\n} else {\\n    if (_fullOffer.offer.creator == BosonTypes.OfferCreator.Buyer) {\\n        commitToBuyerOffer(offerId, _sellerParams);\\n    } else {\\n        commitToOffer(_committer, offerId);\\n    }\\n}\\n\")), mdx(\"h3\", {\n    \"id\": \"recommendation-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#recommendation-1\",\n    \"aria-label\": \"recommendation 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Recommendation:\"), mdx(\"p\", null, \"We advise this validation to be omitted as it restricts the function's input arguments redundantly.\"), mdx(\"h3\", {\n    \"id\": \"alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119-1\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#alleviation-efd5d1a8f23c3bca7c25273ea4c912a367250119-1\",\n    \"aria-label\": \"alleviation efd5d1a8f23c3bca7c25273ea4c912a367250119 1 permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):\"), mdx(\"p\", null, \"The Boson Protocol team evaluated this exhibit and clarified that they wish to validate the presence of default values so as to avoid a buyer assuming their configured values have taken effect.\"), mdx(\"p\", null, \"As such, we consider this exhibit to be nullified given that the original behaviour is explicitly desirable.\"));\n}\n;\nMDXContent.isMDXComponent = true;","headings":[{"depth":2,"value":"<span id=\"ECF-01C\">ECF-01C: Redundant Conditional Validation</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):"},{"depth":2,"value":"<span id=\"ECF-02C\">ECF-02C: Redundant Validation of Seller Parameters</span>"},{"depth":3,"value":"Description:"},{"depth":3,"value":"Example:"},{"depth":3,"value":"Recommendation:"},{"depth":3,"value":"Alleviation (efd5d1a8f23c3bca7c25273ea4c912a367250119):"}]}},"pageContext":{"slug":"/code-style/ExchangeCommitFacet-ECF/","prev":{"label":"DRFeeMutualizer.sol (DRF-C)","link":"/code-style/DRFeeMutualizer-DRF"},"next":{"label":"FundsBase.sol (FBE-C)","link":"/code-style/FundsBase-FBE"}}},"staticQueryHashes":["1954253342","2328931024","2501019404","973074209"]}